home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / appkit.23 < prev    next >
Text File  |  1992-02-06  |  1KB  |  44 lines

  1. {\rtf0\ansi{\fonttbl\f2\fnil Times-Roman;\f0\fmodern Courier;}
  2. \paperw13040
  3. \paperh8160
  4. \margl120
  5. \margr120
  6. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f2\b0\i0\ul0\fs28 Mouse repeat appkit events\
  7. \
  8. Q:  How can I get mouse-repeat events analogous to key-repeat events?\
  9. \
  10. A:  You cannot get them from the hardware and we do not plan to provide that event type.  If you want to simulate them, you can use timer events or timed entries.  \
  11. \
  12. While processing a mouseDown in a modal loop, you use a timer event.  In your 
  13. \b mouseDown: 
  14. \b0 method, you start a timer executing
  15. \b  
  16. \b0 at regular intervals with the
  17. \b  NXBeginTimer() 
  18. \b0 function
  19. \b .  
  20. \b0  The synthetic timer events will simulate mouse-repeat events similar to key-repeat events until you stop the timer upon mouse up with a call to 
  21. \b NXEndTimer
  22. \b0 ().\
  23. \
  24. You can also create and insert mouse-repeat events into the queue programmatically outside of a modal processing loop.  In your 
  25. \b mouseDown: 
  26. \b0 method add a timedEntry procedure with the function 
  27. \b DPSAddTimedEntry()
  28. \b0 .  This procedure should check 
  29. \b PSstilldown()
  30. \b0 , and if so, send the event type that you need.  On 
  31. \b mouseUp:
  32. \b0 , remove the timedEntry with 
  33. \b DPSRemoveTimedEntry()
  34. \b0 .\
  35. \
  36. Please see appkit.650 for more about Timed Entries and appkit.651 for more on Timer Events.\
  37. \
  38. QA23\
  39. \
  40. Valid for 1.0\
  41. Valid for 2.0\
  42. \
  43.  
  44.